<template>
  <div>
    <h2>组件通信</h2>
    <p>message:{{ porps.message }}</p>
    <button @click="genxin">点击</button>
  </div>
</template>

<script setup lang="ts">
const porps = defineProps(['message'])

const emit = defineEmits(['gengxin'])

const genxin = () => {
  emit('gengxin', 'Hello from Child')
}
</script>

<style></style>
